﻿//-----------------------------------------------------------------------
// <copyright file="DataContext.cs" company="deixei.com">
//     Copyright (c) deixei.com. All rights reserved.
// </copyright>
// <author>Marcio Parente</author>
//---------------------------------------------------------------------
namespace Deixei.Domain
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;
    using Deixei.Infrastructure;
    using WebMatrix.WebData;
    using Microsoft.Practices.Unity;
    using Microsoft.Practices.Unity.InterceptionExtension;

    public class DataContext : DbContext
    {
        public DataContext()
            : base("name=DefaultConnection")
        {
            this.Configuration.ProxyCreationEnabled = false;
            this.Configuration.LazyLoadingEnabled = true;
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {

            base.OnModelCreating(modelBuilder);
        }

        public DbSet<User> Users { get; set; }
        public DbSet<Role> Roles { get; set; }
        public DbSet<OAuthMembership> OAuthMemberships { get; set; }
        public DbSet<OAuthToken> OAuthTokens { get; set; }

        public DbSet<Product> Products { get; set; }
        public DbSet<Vendor> Vendors { get; set; }
        public DbSet<Ingredient> Ingredients { get; set; }
        public DbSet<Supplier> Suppliers { get; set; }
        public DbSet<ActionLog> ActionLogs { get; set; }
        public DbSet<Customer> Customers { get; set; }
        public DbSet<Order> Orders { get; set; }
        public DbSet<OrderType> OrderTypes { get; set; }
        public DbSet<Person> Persons { get; set; }
        public DbSet<Contact> Contacts { get; set; }
        
        public DbSet<NavigationArea> NavigationAreas { get; set; }
        public DbSet<NavigationController> NavigationControllers { get; set; }
        public DbSet<WebAppPortfolio> WebAppsPortfolio { get; set; }

    }
}
